package com.show.dao.unit;

import com.show.dto.unit.UnitType;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

/**
 * 部件类型
 *
 * @author liukai
 */
public interface UnitTypeRepository extends JpaRepository<UnitType, String>, JpaSpecificationExecutor<UnitType>, PagingAndSortingRepository<UnitType, String> {


    @Query(value = "SELECT super_map_layer FROM unit_type WHERE sts = '0' AND unit_type_id = ?", nativeQuery = true)
    String getSuperMapLayer(String unitTypeId);

}
